package com.future.log.controller;

import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 日志记录控制器
 *
 * @author shiyong
 * 2022/2/19 16:44
 */
@RestController
@Slf4j
public class LogController {

    /**
     * 添加日志
     *
     * @param content 日志内容
     * @return com.alibaba.fastjson.JSONObject
     * @author shiyong
     * 2022/2/19 16:46
    */
    @PostMapping("/addLog")
    public JSONObject addLog(String content) {
        log.info("添加日志：" + content);

        JSONObject result = new JSONObject();
        result.put("msg", "添加日志成功");
        return result;
    }
}
